import request from '@/utils/request'
import { getToken } from '@/utils/auth'

// 提现操作
export function withdraw(data) {
  return request({
    url: '/withdraw/cashOpt',
    method: 'post',
    data
  })
}

export function getExtensionInfo() {
  return request({
    url: '/promotion/getPromotionCashInfo',
    method: 'get',
    headers: {
      'token': getToken()
    }
  })
}

// 获取提现信息
export function getWithdrawInfo(data) {
  return request({
    url: '/withdraw/cashRecord',
    method: 'get',
    headers: { 'content-type': 'application/x-www-form-urlencoded', token: getToken() },
    params: data
  })
}

// 获取推广订单列表
export function getExtensionOrders(data) {
  return request({
    url: '/promotion/getPromotionOrderList',
    method: 'get',
    headers: { 'content-type': 'application/x-www-form-urlencoded', token: getToken() },
    params: data
  })
}

